/**
 * @param {number[][]} points
 * @return {number}
 */
 var largestTriangleArea = function(points) {
  const l = points.length;
  let ret = 0;
  for(let i = 0; i < l; i++) {
      for(let j = i + 1; j < l; j++) {
          for(let k = j + 1; k < l; k++) {
              const a = Math.sqrt((points[i][0] - points[j][0]) ** 2 + (points[i][1]- points[j][1]) ** 2);
              const b = Math.sqrt((points[i][0] - points[k][0]) ** 2 + (points[i][1]- points[k][1]) ** 2);
              const c = Math.sqrt((points[k][0] - points[j][0]) ** 2 + (points[k][1]- points[j][1]) ** 2);
              const q = (a + b + c) / 2;
              const s = Math.sqrt(q * (q - a) * (q - b) * (q - c));
              if(s) {
                  ret = Math.max(ret, s);
              }
          }
      }
  }
  return ret;
};